package com.yehun.enums;

/**
 * 结果枚举
 * Created by Genius on 2017/4/1 0001.
 */
public enum ResultEnum implements BaseEnum<Integer> {

    Success(1, "成功"),
    Fail(0, "失败"),
    VerifyNotPass(-5, "验证未通过"),
    Upgrade(-9, "请升级到最新版本!"),
    ParameterError(-99, "参数错误"),
    NotFoundData(-100, "未找到数据"),
    Expertion(-999, "异常"),
    MethodTypeError(-1000, "参数类型错误"),
    ServerError(-1001, "服务器异常");

    private final Integer value;
    private final String text;
    ResultEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public Integer getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    @Override
    public String toString() {
        return this.value.toString();
    }
}
